#!/bin/bash
## kola:
##   exclusive: false
##   description: Verify no files under /var and /etc have unlabeled_t SELinux label.

set -xeuo pipefail

# shellcheck disable=SC1091
. "$KOLA_EXT_DATA/commonlib.sh"

# check that no files are unlabeled
unlabeled=$(find /var /etc -context '*:unlabeled_t:*')
if [ -n "${unlabeled}" ]; then
    echo "Found unlabeled files:"
    echo "${unlabeled}"
    exit 1
fi
ok no files with unlabeled_t SELinux label
